package com.example.demo.controller;

import java.text.DateFormat;
import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.example.demo.service.TestService;

@Controller
public class bootcontroller {
	@ResponseBody
	@RequestMapping("/request")
public String request() {
	return "hello Stringboot";
}
	@Resource
	private TestService testService;
	
	   @RequestMapping("/NewFile")
	    public String hello(Model m){
		   testService.sss();
			System.out.println();
			System.out.println("testService.getOne() = " + testService.getOne());
	        return "NewFile";  //视图重定向hello.jsp
	    }
}
